<template>
    <Teleport to="body">
        <div class="box">
            <div class="param" v-for="(v, k) in layout.coordinate.data">
                <div class="lab">{{ k }}:</div>
                <div class="val">{{ v }}</div>
            </div>
        </div>
    </Teleport>
</template>

<script lang="ts" setup>
import { onMounted, ref } from 'vue'
import { useLayout } from '@/stores/layout';
import { Bus, G2V_COORDINATE, V2G_ADD_MESH } from '../game/Bus';

const layout = useLayout();


Bus.on(G2V_COORDINATE, (val:any) => {
    console.log(val, "val")
    const {x, y, z} = val;
    layout.changeCoordinateData({x, y, z});
})

</script>

<style lang="less" scoped>
@import url("./index.less");
</style>